package com.athuiju.fenxiaoback.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 优惠卷表
 * </p>
 *
 * @author athuiju
 * @since 2021-06-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="TbCoupon对象", description="优惠卷表")
public class TbCoupon implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "优惠卷id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "优惠卷名称")
    private String name;

    @ApiModelProperty(value = "优惠卷类型,1、抵扣  2、折扣(打折）")
    private String type;

    @ApiModelProperty(value = "抵扣或折扣条件，如果没有限制，则设置为0")
    private Long condition;

    @ApiModelProperty(value = "优惠金额")
    private Long reduction;

    @ApiModelProperty(value = "如果没有折扣，为100。如果是八五折，折扣为85")
    private Integer discount;

    @ApiModelProperty(value = "优惠券可以生效的sku的id拼接，以,分割")
    private String targets;

    @ApiModelProperty(value = "剩余优惠券数量")
    private Integer stock;

    @ApiModelProperty(value = "优惠券生效时间")
    private Date startTime;

    @ApiModelProperty(value = "优惠券失效时间")
    private Date endTime;


}
